package at.fhj.itm11.forum.service.stubs;

import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;

import org.primefaces.model.UploadedFile;

public class UploadedFileStub implements UploadedFile, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2731638365348572234L;
	private String contentType;
	private byte[] contents;
	private String fileName;

	@Override
	public String getContentType() {
		return contentType;
	}

	@Override
	public byte[] getContents() {
		return contents;
	}

	@Override
	public String getFileName() {
		return fileName;
	}

	@Override
	public InputStream getInputstream() throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getSize() {
		return contents.length;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public void setContents(byte[] contents) {
		this.contents = contents;
	}

}
